#ifndef BRIDGE_H
#define BRIDGE_H
#include <iostream>

class Implementor {
public:
    virtual void OperationImp() = 0;
};

class ConcreteImplementorA : public Implementor {
public:
  void OperationImp() {
    std::cout << "ConcreteImplementorA" << std::endl;
  }
};

class ConcreteImplementorB : public Implementor {
public:
  void OperationImp() {
    std::cout << "ConcreteImplementorB" << std::endl;
  }
};

class Abstraction {
public:
  Abstraction(Implementor* impl) : impl_(impl) {}

  virtual void Operation() = 0;
public:
  Implementor* impl_;
};

class RefinedAbstraction : public Abstraction {
public:
  RefinedAbstraction(Implementor* impl) : Abstraction(impl) {}
  void Operation() {
    std::cout << "RefinedAbstraction Operation:" << std::endl;
    impl_->OperationImp();
    std::cout << std::endl;
  }
};

#endif // BRIDGE_H
